package com.example.springbootdemo;

import org.apache.commons.lang3.StringUtils;

import java.util.Arrays;
import java.util.List;

/**
 * @Author: zhangrongqing
 * @Date: 2020/5/20 19:47
 */
public class CharSearchDemo {

    public static void main(String[] args) {
        List<String> nameList = Arrays.asList("刀光剑影","腥风血雨","黑灯瞎后");
        boolean result = false;
        for(String name:nameList){
            result = (result || StringUtils.contains(name, "剑"));
        }

        System.out.println(result);
    }
}
